<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
	<meta http-equiv="Pragma" content="no-cache" />
	<meta http-equiv="Expires" content="0" />
    <title>付款信息</title>
    <link href="css/mui.min.css" rel="stylesheet"/>
    <link href="css/previewImage.css" rel="stylesheet"/>
    <link href="css/common.css" rel="stylesheet"/>
    <script src="js/mui.min.js"></script>
    <script src="js/mui.zoom.js"></script>
    <script src="js/mui.previewimage.js"></script>
    <script type="text/javascript" charset="utf-8">
        mui.init();
    </script>
</head>
<body>
<header class="mui-bar mui-bar-nav" style="padding-right: 15px;">
	<h1 class="mui-title">保单信息-付款信息</h1>
	<button class="mui-btn mui-btn-blue mui-btn-link mui-pull-right" onclick="window.history.go(-1);">返回</button>
</header>
<div class="mui-content">
	<div>
		<ul class="mui-table-view">
			<li class="mui-table-view-cell">
				订单信息
			</li>
			<li class="mui-table-view-cell">
				<div class="mui-table">
                    <div class="mui-table-cell mui-col-xs-10" id="payInfo">
                    </div>
				</div>
			</li>
		</ul>
		<ul class="mui-table-view" style="margin-top: 10px;">
			<li class="mui-table-view-cell">付款信息</li>
			<li class="mui-table-view-cell" id="payCardName"></li>
			<li class="mui-table-view-cell" id="cardNumber"></li>
			<li class="mui-table-view-cell" id="code" align="center">
				<h5>长按二维码可转发</h5>
			</li>
		</ul>
	</div>
</div>

<footer></footer>
</body>
<script src="js/jquery.js"></script>
<script src="js/jquery.cookie.js"></script>
<script src="js/wxOpen.js"></script>
<script src="js/common.js"></script>
<script>

mui.previewImage();
$(function () {
    var orderCode = GetQueryString("orderCode"),
        consumerType = GetQueryString("consumerType"),
        consumerName = GetQueryString("consumerName"),
        consumerIdCard = GetQueryString("consumerIdCard"),
        enterpriseName = GetQueryString("enterpriseName"),
        enterpriseLicence = GetQueryString("enterpriseLicence"),
        wxOrderStatusText = GetQueryString("wxOrderStatusText"),
        applyTime = GetQueryString("applyTime"),
        auditingTime = GetQueryString("auditingTime"),
        signTime = GetQueryString("signTime");

    var payResult = "";
    if(consumerType == "GR"){
        payResult += '<h5>车主姓名：'+ consumerName +'</h5>';
        payResult += '<h5>身份证号：'+ consumerIdCard +'</h5>';
    }else if(consumerType == "QY"){
        payResult += '<h5>企业名称：'+ enterpriseName +'</h5>';
        payResult += '<h5>营业证号：'+ enterpriseLicence +'</h5>';
    }
    payResult += '<h5>申请进度：<span style="color: #ff0000;">'+ wxOrderStatusText +'</span></h5>';
    payResult += '<h5>申请时间：'+ applyTime +'</h5>';
    payResult += '<h5 style="display: none">审核时间：'+ auditingTime +'</h5>';
    payResult += '<h5 style="display: none">签约日期：'+ signTime +'</h5>';
    $("#payInfo").append(payResult);


    //订单付款-付款信息
    $.ajax({
        type: 'POST',
        url: url +'weixinOrder/paymentInformation',
        data:{
            "openId":openId,
            "orderCode":orderCode
        },
        dataType: 'json',
        success: function (data) {
            console.log(data);
            if (data.repCode == "000000") {
                if(!data.data.payCardName){
                    $("#payCardName").html("收款账户名称：暂无");
                    $("#cardNumber").html("收款账户账号：暂无");
                }else{
                    $("#payCardName").html("收款账户名称：" + data.data.payCardName);
                    $("#cardNumber").html("收款账户账号：" + data.data.cardNumber);
                }

                var s = data.data.paymentIds;
                var ss = s.split(",");
                if(ss.length > 0){
                    for(var i=0; i<ss.length; i++){
                        $("#code").prepend('<img src="' + url + 'weixinFile/getImg?id='+ ss[i] +'" width="70%" data-preview-src="" data-preview-group="1"/><br>');
                    }
                }
            }else if(data.repCode == "999999") {
                mui.toast("获取付款信息失败");
            }
        },
        error: function () {
            mui.toast("error");
        }
    });




});
</script>
</html>